import java.util.HashMap;
import java.util.Scanner;

// 找出字符串中第出现一次的字符.
public class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        HashMap<Character, Integer> map = new HashMap<>();
        String s = in.next();
        for (int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            if(!map.containsKey(ch)) {
                map.put(ch,1);
            } else {
                int val = map.get(ch);
                map.put(ch,val+1);
            }
        }

        int i = 0;
        for (; i < s.length(); i++) {
            if(map.get(s.charAt(i)) == 1) {
                System.out.println(s.charAt(i));
                break;
            }
        }
        if(i >= s.length())
            System.out.println(-1);
    }
}